Cell matching across multiple characteristics during battery assembly

ABSTRACT

For each cell in a plurality of cells from a same manufacturing run, a first and a second cell characteristic are received in order to obtain a plurality of cell characteristics. For each cell, a batch compatibility number that is associated with a number of compatible cells that that cell is compatible with is determined based at least in part on the plurality of cell characteristics. The plurality of cells is sorted according to the batch compatibility numbers to obtain a sorted list of cells. A plurality of compatible cells to include in a battery is selected from the plurality of cells, including by evaluating the plurality of cells according to the order of the sorted list of cells and beginning with the lowest batch compatibility number.

CROSS REFERENCE TO OTHER APPLICATIONS

This application is a continuation of co-pending U.S. patent applicationSer. No. 15/400,488 entitled CELL MATCHING ACROSS MULTIPLECHARACTERISTICS DURING BATTERY ASSEMBLY filed Jan. 6, 2017 which isincorporated herein by reference for all purposes.

BACKGROUND OF THE INVENTION

Some types of batteries include multiple cells and during assembly ofsuch batteries, the cells to include in a particular battery areselected. Although the pool of cells on which battery matching isperformed may be from the same lot or manufacturing run, there willtypically be some variation in the (e.g., electrical) characteristics ofthe cells. Batteries perform better when the all of the cells in aparticular battery are matched. Although techniques exist for matchingcells according to a single characteristic, there is no technique tomatch cells across multiple cell characteristics. This is not astraightforward problem since cell characteristics are oftenuncorrelated so that even though two cells are compatible with respectto one cell characteristic, it does not necessarily hold true that thecells will also be compatible with respect to another cellcharacteristic. New techniques to match cells across multiple cellcharacteristics would be desirable since it may reduce the number ofleftover cells which are discarded.

BRIEF DESCRIPTION OF THE DRAWINGS

Various embodiments of the invention are disclosed in the followingdetailed description and the accompanying drawings.

FIG. 1 is a diagram illustrating an embodiment of a battery whichincludes a plurality of cells.

FIG. 2 is a table illustrating an embodiment of cell characteristicswhich are used to match cells.

FIG. 3 is a diagram illustrating an embodiment of distributions for cellcharacteristics.

FIG. 4 is a flowchart illustrating an embodiment of a process to performcell matching across multiple cell characteristics.

FIG. 5 is a diagram illustrating an embodiment of a cell compatibilitymatrix.

FIG. 6 is a flowchart illustrating an embodiment of process for apairwise cell compatibility test.

FIG. 7 is a diagram illustrating an embodiment of a sorted list ofcells.

FIG. 8 is a diagram illustrating an embodiment of cells evaluatedaccording to the order specified by the sorted list of cells.

FIG. 9 is a flowchart illustrating an embodiment of a tiebreakerprocess.

FIG. 10 is a diagram illustrating an embodiment of a tiebreakertechnique which first globally uniquifies the cells which are compatiblewith the tied cells and then examines the batch compatibility numbers ofthe uniquified compatible cells.

FIG. 11 is a flowchart illustrating an embodiment of a tiebreakerprocess which first globally uniquifies the cells which are compatiblewith the tied cells and then examines the batch compatibility numbers ofthe uniquified compatible cells.

FIG. 12 is a diagram illustrating an embodiment of a tiebreakertechnique where cells which are compatible with the tied cells areordered based on batch compatibility number and then evaluated on alevel-by-level basis.

FIG. 13 is a flowchart illustrating an embodiment of a tiebreakerprocess where cells which are compatible with the tied cells are orderedbased on batch compatibility number and then evaluated on alevel-by-level basis for uniqueness.

DETAILED DESCRIPTION

The invention can be implemented in numerous ways, including as aprocess; an apparatus; a system; a composition of matter; a computerprogram product embodied on a computer readable storage medium; and/or aprocessor, such as a processor configured to execute instructions storedon and/or provided by a memory coupled to the processor. In thisspecification, these implementations, or any other form that theinvention may take, may be referred to as techniques. In general, theorder of the steps of disclosed processes may be altered within thescope of the invention. Unless stated otherwise, a component such as aprocessor or a memory described as being configured to perform a taskmay be implemented as a general component that is temporarily configuredto perform the task at a given time or a specific component that ismanufactured to perform the task. As used herein, the term ‘processor’refers to one or more devices, circuits, and/or processing coresconfigured to process data, such as computer program instructions.

A detailed description of one or more embodiments of the invention isprovided below along with accompanying figures that illustrate theprinciples of the invention. The invention is described in connectionwith such embodiments, but the invention is not limited to anyembodiment. The scope of the invention is limited only by the claims andthe invention encompasses numerous alternatives, modifications andequivalents. Numerous specific details are set forth in the followingdescription in order to provide a thorough understanding of theinvention. These details are provided for the purpose of example and theinvention may be practiced according to the claims without some or allof these specific details. For the purpose of clarity, technicalmaterial that is known in the technical fields related to the inventionhas not been described in detail so that the invention is notunnecessarily obscured.

Various embodiments of a technique to match cells (e.g., during assemblyof one or more batteries) across multiple cell characteristics aredescribed herein. First, an example of a battery is described for whichcells may be selected according to the technique(s) described herein.Then, various embodiments of cell matching techniques are described.

FIG. 1 is a diagram illustrating an embodiment of a battery whichincludes a plurality of cells. In the example shown, battery 100includes multiple cells (102) which may be matched or otherwise selectedaccording to one or more of the techniques described herein. In thisexample, a battery includes 12 cells; other battery embodiments mayinclude some other number of cells. A metal can (104) is used to holdalternating layers of cells (102) and insulation (106). The layers ofinsulation (106) act as a fire retardant to slow the spread of fire fromcell-to-cell in the event one of the cells in the battery ignites. Tabs(108) are connected to the cells and are used to carry the powergenerated by the cells out of the battery. The tops of the tabs areconnected to the bottom of a lid (not shown) which is attached to thetop of the can. The top of the lid has a positive terminal and anegative terminal from which the power generated by the cells in thebattery can be accessed.

A battery which includes multiple cells as shown here performs betterwhen all of the cells in the battery match across multiple cellcharacteristics of interest. During battery assembly, amulti-characteristic cell matching process (some examples of which aredescribed in more detail below) is performed on a group of unmatched orungrouped cells so that cells to include in a battery are identified.For example, suppose 100 cells are run through the cell matchingprocess. If the process identifies N groups of 12 cells, then Nbatteries will be assembled and there will be 100−(12N) leftover cells.Battery manufacturers may not want to mix cells from different lots ormanufacturing runs with each other, so it may be desirable to minimizethe number of leftover cells since any leftover cells may be discarded.

The following figure describes some exemplary cell characteristics whichin subsequent examples are used to match cells.

FIG. 2 is a table illustrating an embodiment of cell characteristicswhich are used to match cells. In examples described herein, cellcharacteristics of capacity (e.g., in units of Ah), open circuit voltage(e.g., in units of volts), resistance (e.g., in units of ohms), andself-discharge rate (e.g., in units of μA) are used to match the cells.The values for capacity, open circuit voltage, resistance, andself-discharge rate are shown respectively in rows 200-203 for sixexemplary cells. Naturally, these cell characteristics are merelyexemplary and the techniques described herein may incorporate anycombination of cell characteristics. In examples described herein, it isassumed that the cells have already been tested to obtain values for allof the cell characteristics of interest and measurement techniques arenot described herein for brevity. Similarly, for simplicity and brevity,this table only shows six cells. Naturally, a real-world batteryassembly process may perform cell matching on a much larger pool ofcells.

One objective during the cell matching process is to ensure that all ofthe cells in a given battery are matched. More specifically, two cellsare considered to be a match (sometimes referred to as a pair match) ifthe difference between each characteristic is within some correspondingtolerance. For example, for cell 1 (see column 204) and cell 2 (seecolumn 206) in the table to be considered a match:

|C1−C2| should not exceed C_(tolerance); and

|V1−V2| should not exceed V_(tolerance); and

|R1−R2| should not exceed R_(tolerance); and

|D1−D2| should not exceed D_(tolerance).

If even one of the cell characteristics has a difference that exceedsthe corresponding tolerance, then that pair of cells is not a match(i.e., they are incompatible) and they should not be put into the samebattery. Naturally, that pair of incompatible cells may be separated and(if possible) included in different batteries.

Unfortunately, the characteristics are not strongly correlated and apair of cells may be compatible according to one characteristic but notanother characteristic. The following figure shows an example of this.

FIG. 3 is a diagram illustrating an embodiment of distributions for cellcharacteristics. In the example shown, diagrams 300-303 respectivelyshow example distributions for capacity, open circuit voltage,resistance, and self-discharge rate. As shown, all of the distributionshave a different shape.

The diagrams also show where two exemplary cells fall within thedistributions. Cell A is represented with a star and cell b isrepresented with a triangle. With respect to capacity (see diagram 300)and self-discharge rate (see diagram 303), the two cells are compatiblebecause the differences in values do not exceed the relevant tolerances.To put it another way, they are sufficiently close to each other withrespect to those characteristics. However, with respect to open circuitvoltage (see diagram 301) and resistance (see diagram 302), the cellsare incompatible because the differences in values for thosecharacteristics exceeds the relevant tolerance. To put it another way,the values are too far apart for those characteristics.

The following figure describes an exemplary cell matching process whichin some embodiments uses the four exemplary cell characteristics shownin FIG. 2.

FIG. 4 is a flowchart illustrating an embodiment of a process to performcell matching across multiple cell characteristics. In some embodiments,the process is performed during a battery assembly process wherehundreds or thousands of cells from the same cell manufacturing run orlot are evaluated across multiple cell characteristics of interest andare identified for inclusion in a battery.

At 400, for each cell in a plurality of cells, a first cellcharacteristic and a second cell characteristic are received in order toobtain a plurality of cell characteristics. Naturally, the cell matchingprocess may be performed using any number of characteristics of interestand additional cell characteristics may be obtained. In the example ofFIG. 2, four cell characteristics are received for six cells and thetable shown there is one example of a plurality of cell characteristicswhich may be received at step 400.

At 402, for each cell in the plurality of cells, a batch compatibilitynumber that is associated with a number of compatible cells that thatcell is compatible with is determined based at least in part on theplurality of cell characteristics. In some embodiments, step 402includes generating a cell compatibility matrix which indicates (e.g.,for all possible pairs of cells) whether a given pair of cells iscompatible (and therefore can be put into the same battery together)across the first cell characteristic, the second cell characteristic,and any other cell characteristics of interest (if applicable). In someembodiments, the batch compatibility number counts a cell'scompatibility with itself when calculating the batch compatibilitynumber. In some other embodiments, a cell's compatibility with itself isnot counted towards that cell's batch compatibility number. Thefollowing figure shows an example cell compatibility matrix.

FIG. 5 is a diagram illustrating an embodiment of a cell compatibilitymatrix. In the example shown, each entry in cell compatibility matrix500 indicates whether a particular pair of cells is compatible with eachother. Entries along the diagonal correspond to a comparison of a givencell with itself and so “not applicable” is shown for those entries.Naturally, in some embodiments, a process may choose to populate entriesalong the diagonal of a cell compatibility matrix with a compatibleindication or an incompatible indication (e.g., in the pseudocodeexamples below, the cell compatibility matrix is populated so that celli is compatible with cell i (i.e., itself)). Since the entry for (celli, cell j) must be the same as the entry for (cell j, cell i), the tableis symmetric along the diagonal and this property may be used topopulate some of the entries in an n×n table (e.g., instead ofperforming the same compatibility check again). In some embodiments, ann×n table (such as the one shown) is condensed into something smallersince the n×n table contains duplicate information.

A pairwise cell compatibility test which checks all cell characteristicsof interest may be used to populate the exemplary cell compatibilitymatrix shown. The following figure describes one example where there aretwo cell characteristics of interest.

FIG. 6 is a flowchart illustrating an embodiment of process for apairwise cell compatibility test. In some embodiments, the exampleprocess is used to determine the number of compatible cells at step 402in FIG. 4. In some embodiments, the example process is used to populatea cell compatibility matrix, such as the one shown in FIG. 5. In theexample shown, compatibility is evaluated based on two cellcharacteristics of interest. Naturally, the exemplary process shown maybe expanded upon (e.g., by repeating certain steps) in order to evaluatea pair of cells across three or more cell characteristics of interest.

At 600, a first difference is determined between a first cell in theplurality of cells and a second cell in the plurality of cells for thefirst cell characteristic. At 602, a second difference is determinedbetween the first cell and the second cell for the second cellcharacteristic. For example, in the equations above, |C1−C2|(alternatively, C1−C2) is an example of step 600 and |V1−V2|(alternatively, V1−V2) is an example of step 602.

At 604, it is determined if the first difference exceeds a firsttolerance associated with the first cell characteristic. For example,C_(tolerance) (from the equations above) is an example of a firsttolerance. If it is determined at step 604 that first difference exceedsthe first tolerance, then the first cell and the second cell aredeclared to be incompatible at step 608.

If it is determined at step 604 that the first difference does notexceeds the first tolerance, then at 606 it is determined if the seconddifference exceeds a second tolerance associated with the second cellcharacteristic. For example, C_(tolerance) is an example of a secondtolerance from the equations above. If it is determined at step 606 thatthe second difference exceeds the second tolerance, the first cell andthe second cell are declared to be incompatible at step 608. Otherwise,the first cell and the second cell are declared to be compatible at step610. In other words, the differences in values for all cellcharacteristics of interest must be within their respective tolerancesin order for the two cells to be compatible.

The following shows another example where a (e.g., unsorted) cellcompatibility matrix is generated in pseudocode:

Define nCells as the number of cells in the batch Define a [nCells ×nCells] matrix M, the unsorted compatibility matrix /*Loop through eachcell, checking for compatibility with all other cells in the batch */For each cell k:   For each cell j:     If cell k's attributes arewithin tolerances of     cell j's attributes:       M(k,j) = 1     else      M(k,j) = 0     end   end end /*This will generate a matrix witheach cell's compatibility with every other cell. M(k,j) is 1 if cell kis compatible with cell j and 0 otherwise*/

Returning to FIG. 4, once batch compatibility numbers have beendetermined at step 402, the plurality of cells are sorted according tothe batch compatibility numbers in order to obtain a sorted list ofcells at 404. The following figure shows an example of a sorted list ofcells.

FIG. 7 is a diagram illustrating an embodiment of a sorted list ofcells. In this example, the sorted list (700) is generated using thecell compatibility matrix from FIG. 5. The list is sorting in thisexample in descending order so that cell 6 (which is compatible withfour other cells) is listed first, cell 4 (which is compatible with fourother cells) is listed second, cell 2 (which is compatible with threeother cells) is listed third, cell 1 (which is compatible with threeother cells) is listed fourth, cell 5 (which is compatible with twoother cells) is listed fifth, and cell 3 (which is compatible with twoother cells) is listed sixth. This is one example of a sorted list whichis generated at step 404 in FIG. 4. Although the example of FIG. 7evaluates the list from bottom to top (i.e., in ascending order), thetechniques described herein also work with a list sorted in ascendingorder.

The following shows another example where a sorted cell compatibilitymatrix (which is one example of a sorted list of cells) is generated inpseudocode:

/*Calculate the batchCompatibilityScore of each cell k by summing theits corresponding row of M. */ Define a [nCells × 1] vectorbatchCompatibilityScore for each cell k = 1:nCells:  batchCompatibilityScore(k) = sum(M(k,:)) end Define a function [Y,I] =sort(X) such that:   X is a vector of values   Y is the elements of X,sorted in ascending order   I is a vector of indices such that X(I) = YDefine a [nCells × 1] vector Cmap as follows:   [~,Cmap] =sort(batchCompatibilityScore) /*Therefore, the element Cmap(1) is theindex of the cell with the lowest batchCompatibilityScore value */Define a [nCells × nCells] matrix C, the sorted compatibility matrix/*Step through each row of C. Map over the corresponding values from theM matrix to the C matrix, using Cmap as a mapping key. */ For each cellk = 1:nCells:   C(k,:) = M(Cmap(k),Cmap) end /*The resulting C matrix isordered such that as the row/column number of C increases, the cellsthat correspond to those rows will have higher batch-compatibility. Acell represented by row k in the C matrix corresponds to the Cmap(k)-throw in the M matrix. */

Returning to FIG. 4, at 406, a list of compatible cells to include in abattery is generated, including by evaluating the plurality of cellsaccording to the order specified by the sorted list of cells andbeginning with a cell with the lowest batch compatibility number. Anexample of this is shown in the following figure.

FIG. 8 is a diagram illustrating an embodiment of cells evaluatedaccording to the order specified by the sorted list of cells. Thisexample continues the example of the previous figure. Initially, the setof compatible cells to include in a battery is an empty set (e.g., { }).The cell with the lowest batch compatibility number is evaluated firstand is (e.g., automatically) included in the set of compatible cells toinclude in the battery. In this example, this means that cell 3 isincluded in the set of cells to include in the battery (see, e.g., FIG.7 where cell 3 is at the bottom of the sorted list).

Once the set of compatible cells to include in the battery is not empty,any cell being evaluated is compared against all cells in the set.Diagram 800 shows the first iteration of this. The left column (802 a)shows the current set of compatible cells, which in the state shownincludes only cell 3. The right column (804 a) shows the sorted list,updated to reflect any cells which have been selected to be included inthe battery. As such, updated sorted list 804 a does not include cell 3since it has been selected for inclusion in the battery.

In diagram 800, cell 5 (i.e., the cell being evaluated) is comparedagainst cell 3 (i.e., the current set of compatible cells to include inthe battery). In some embodiments, a cell compatibility matrix isconsulted to see if two cells are compatible with each other. As shownin FIG. 5, cell 5 and cell 3 are not compatible with each other andtherefore cell 5 is not moved from the right column to the left column.

Diagram 806 shows the next cell in the updated sorted list beingevaluated. In this iteration, the compatibility of cell 3 (see leftcolumn 802 b) and cell 1 (see right column 804 b) is checked. Per thecell compatibility matrix shown in FIG. 5, those two cells arecompatible, so cell 1 is moved from the right column to the left column.

Diagram 808 shows the next iteration. In this state, cell 2 (see rightcolumn 804 c) is being evaluated and is compared against cell 3 as wellas cell 1 (see left column 802 c). Cell 2 is incompatible with bothcells, so cell 2 is not moved from the right column to the left column.In order to be included in the set on the left, a cell being evaluatedin the right column needs to be compatible with all cells in the leftcolumn.

Once enough compatible cells have been identified to fill a battery, theprocess stops (at least temporarily) and the identified cells areincluded in the next battery being assembled. In some embodiments, onceselected, the compatible cells do not have to follow any particularorder within the battery and any appropriate technique may be used topack or layer the cells in the battery. The cell matching process maythen be repeated on the remaining cells in the sorted list to identifycompatible cells to include in the next battery.

In pseudocode, another example of step 406 in FIG. 4 is:

Define a [nCells × nCells] matrix Cremnant such that: Cremnant = C; /*Cremnant represents the remaining cells - in sorted order - that havenot been matched to any sets yet. */ Define a function [validSet] =findValidSet(iCell,X) such that:   X is a compatibility matrix whereeach element (k,j)   is cell k's compatibility with cell j.Compatibility   is expressed as a 1 if compatible and a 0 if not.  iCell is a cell index.   validSet is a [12 × 1] vector wherevalidSet(1) =   iCell and validSet(2:12) are the 11 lowest indices in  matrix X corresponding cells that are compatible with   both the celldenoted by iCell and each other. The   function returns validSet = NULLif there are no valid   sets possible. For each cell k = 1:nCells   /*Check if this cell is compatible with at least 11   other cells */   Ifsum(Cremnant(k,:) >= 11)     validSet = findValidSet(k,Cremnant)     Ifa valid matching set was found:       iSet = iSet + 1       sets(iSet,:)= validSet       /* Remove all cells in the corresponding to       thejust-formed set from the Cremnant matrix       so they do not getreused. */       Cremnant(validSet,:) = 0       Cremnant(:,validSet) = 0    end   end end

If desired, the following contains more information about thevalidSet=findValidSet(iCell,X) function:

As previously described in the sorting methodology:

-   -   X is a compatibility matrix where each element (k,j) is cell k's        compatibility with cell j. Compatibility is expressed as a 1 if        compatible and a 0 if not.    -   iCell is a cell index.    -   validSet is a [12×1] vector where validSet(1)=iCell and        validSet(2:12) are the 11 lowest indices in matrix X        corresponding cells that are compatible with both the cell        denoted by iCell and each other. The function returns        validSet=NULL if there are no valid sets possible.

The function will choose the cells with the lowest indices that can forma matching set. Thus, this function relies on the fact that X is asorted compatibility matrix in order to form a set with the leastbatch-compatible cells. The implementation is as follows:

/* Initialization */ Define a vector matchList as the list of indices ofall cells that are compatible with cell iCell, sorted in ascendingorder. Define a [1 × 12] vector tempSet, container of cell indices forprospective sets. tempSet(1) = iCell tempSet(2:12) = 0 /* This counterkeeps track of the size of our prospective set */ iSet = 2 /*Thiscounter tracks where we are in the matchingCells list when adding newprospective set members. */ iSearch = 1 /* This counter tracks thematchingCells index where we started the search. */ iSearchStart = 1Define a function [flag] = isValidSet(set,X):   set is a [1 × 12] vectorof cell indices.   X is the compatibility matrix   flag is a booleanthat is TRUE if the cells   corresponding to all non-zero indices in setare   compatible with each other and FALSE if otherwise. /* Begin searchfor a valid set */ /* The overall method is to search through the listof compatible cells, adding them to the tempSet container one at a timeand checking if all sets in tempSet are still valid. If the list ofcells is exhausted, then remove all cells from tempSet except iCell andstart the process over at from another position in the list ofcompatible cells. If all starting positions are exhausted, then thereare no valid sets in X containing iCell. */ While true:   tempSet(iSet)= matchingCells(iSearch)   If isValidSet(tempSet,X)     /*If we have avalid set so far, then continue     searching for the next validaddition to tempSet     */     tempSet (iSet) = matchingCells (iSearch);    /* If we just added the 12th cell to the set,     then we're done */    If iSet == 12       validSet = tempSet;       return     End    iSet = iSet + 1   end   /* We're not done yet, so increment iSearchto search   farther down the matchingCells list*/   iSearch = iSearch +1;   /* Other exit conditions */   If iSearch > number of elements ofmatchingCells     /*We've run out of cells to search through and    haven't found a valid set. Restart the search but     at one indexfarther up on the matchingCells     list. */     iSet = 1;    tempSet(2:12) = 0     iSearchStart = iSearchStart + 1 /*incrementour     search starting point*/     iSearch = iSearchStart /*reset oursearch     location in matchingCells*/   end   If iSearchStart > numberof elements in matchingCells     /*If iSearchStart exceeds the length of    matchingCells, we have started the search in     every position andhaven't found any valid sets.     We can call off the search. */    validSet = NULL     return   end end

Returning to FIG. 7, as shown there, in some cases there will be cellswith the same batch compatibility number (i.e., a tie). For example,cell 6 and cell 4 are tied with each other, cell 2 and cell 1 are tiedwith each other, and cell 5 and cell 3 are tied with each other. Thefollowing figures describe various tiebreaker examples when two or morecells have the same batch compatibility number.

FIG. 9 is a flowchart illustrating an embodiment of a tiebreakerprocess. In some embodiments, the process is performed on any groups oftied cells at step 404 in FIG. 4 when a sorted list of cells isgenerated. This tiebreaker process and other tie breaker processesdescribed herein may be repeated as needed for each group of tied cells(e.g., without considering other tied cells in other groups and/or cellswhich are not tied).

At 900, a set of compatible cells is determined for each tied cell in aplurality of tied cells in order to obtain a plurality of sets ofcompatible cells. For example, in FIG. 7, cell 6 and cell 4 are tiedwith each other because they both have a batch compatibility number of4. Step 900, applied to those tied cells, would determine what cells arecompatible with cell 6 and what cells are compatible with cell 4.

At 902, a tie between the plurality of tied cells is broken based atleast in part on uniqueness associated with the plurality of sets ofcompatible cells and one or more batch compatibility numbers associatedwith the plurality of sets of compatible cells. To continue the examplefrom above and FIG. 7, uniqueness and batch compatibility numbersassociated with the set of cells that are compatible with cell 6 and theset of cells that are compatible with cell 4 would be considered inbreaking the tie between cell 6 and cell 4.

In some embodiments, uniqueness is considered or evaluated globally atstep 902. For example, a global uniquification process may be performedon the plurality of sets of compatible cells so that any duplicates areremoved. Alternatively, uniqueness may be evaluated locally, for examplein the context of a particular level or index within a sorted or orderedlist of compatible cells. The following figures show some examples ofboth.

FIG. 10 is a diagram illustrating an embodiment of a tiebreakertechnique which first globally uniquifies the cells which are compatiblewith the tied cells and then examines the batch compatibility numbers ofthe uniquified compatible cells. This is one example of how step 902 inFIG. 9 may be performed.

Diagram 1000 shows three exemplary tied cells at the beginning of thetiebreaker process. In this example, all of the tied cells have a batchcompatibility number of 4 because they are compatible with four othercells. The first tied cell (see row 1002 a) is compatible with cell 1,cell 5, cell 7, and cell 8. The second tied cell (see row 1004 a) iscompatible with cell 5, cell 7, cell 8, and cell 10. The third tied cell(see row 1006 a) is compatible with cell 1, cell 4, cell 8, and cell 9.

The cells which are compatible with the tied cells (shown in the rightcolumn in diagram 1000) are globally uniquified (e.g., across allsets/rows) by removing any duplicates. Since cell 1, cell 5, cell 7, andcell 8 occur more than once in diagram 1000, those cells are removed anddiagram 1010 shows the sets/rows without those duplicate cells. Row 1002b (associated with the first tied cell) is now an empty set, row 1004 b(associated with the second tied cell) now includes cell 10, and row1006 b (associated with the third tied cell) now includes cell 4 andcell 9.

The batch compatibility numbers of the uniquified compatible cells arethen examined. Diagram 1010 and diagram 1012 show the same uniquifiedcompatible cells in their right columns, but diagram 1012 also shows thecorresponding batch compatibility numbers in parenthesis. The ties arebroken based on the lowest batch compatibility number (if any) for eachrow. Row 1006 c (associated with the third tied cell) has twocells/scores, but the lowest batch compatibility number in that row is abatch compatibility number of 9 (corresponding to cell 4). Since thatbatch compatibility number of 9 (corresponding to cell 4) is not lowerthan the batch compatibility number of 7 in row 1004 c (corresponding tothe second tied cell), the second tied cell is selected first. That is,the second tied cell in this example would be listed first in a sortedlist and be evaluated for inclusion in a battery before the other tiedcells in this group. The third tied cell would be selected next (i.e.,second) since it has the next lowest batch compatibility number (i.e., abatch compatibility number of 9 for that row).

Row 1002 b/1002 c in diagram 1010/1012 is empty and so there is nocorresponding batch compatibility number to show or examine. Such emptysets after duplicates are removed may be listed or selected last duringthe tiebreaker process (e.g., because they are compatible with cellswhich in turn are compatible with other tied cells in the group, and sothere is no unique or special match those tied cells can make comparedto the other tied cells in the group). As such, the tiebreaker processwould (at the end) have the second tied cell first, the third tied cellsecond, and the first tied cell third.

The following figure describes this more formally and/or generally in aflowchart.

FIG. 11 is a flowchart illustrating an embodiment of a tiebreakerprocess which first globally uniquifies the cells which are compatiblewith the tied cells and then examines the batch compatibility numbers ofthe uniquified compatible cells. In some embodiments, step 902 in FIG. 9includes the process shown.

At 1100, a plurality of sets of compatible cells associated with theplurality of tied cells are globally uniquified in order to obtain aplurality of uniquified sets of compatible cells. See, for example, theremoval of duplicates between diagram 1000 and diagram 1010 in FIG. 10.

At 1102, a lowest batch compatibility number is determined for eachnon-empty uniquified set in the plurality of uniquified sets. In diagram1012 in FIG. 10, for example, this step is not applicable for row 1002 csince that row is empty. For row 1004 c in diagram 1012, the lowestbatch compatibility number is 7 and for row 1006 c, the lowest batchcompatibility number is 9.

At 1104, the plurality of tied cells are sorted based at least in parton the lowest batch compatibility number for each non-empty uniquifiedset, wherein any empty uniquified sets are ordered last when breakingthe tie. See, for example, the ordering shown in diagram 1012 in FIG.10. Note row 1004 c is ordered first by the tiebreaker process (becauseit has the lowest batch compatibility number of 7) and row 1006 c isordered next (because it has the next lowest batch compatibility numberof 9). Row 1002 c (which became an empty set after uniquification) isordered last by the tiebreaking process.

It is noted that the technique described in FIG. 10 and FIG. 11 is notnecessarily the optimal tie breaking technique. For example, in FIG. 10,if cell 1 had the lowest batch compatibility number, then it isconceivable that the first tied cell or the third tied cell should beranked first, rather than the second tied cell. A better tie breakingtechnique (e.g., in terms of performance) is described below, but aswill be described in more detail below, the number of steps oriterations in the following technique is variable (which could make theruntime longer whereas the technique described above has a fixed numberof steps) and the degree of complexity is greater (e.g., a findTiesfunction is called recursively in pseudocode below). For someapplications, the performance improvement is not worth the potentiallylonger runtime and/or increased complexity and the technique describedabove is used. In other applications (e.g., where the performanceimprovement is worth the costs described above), the technique describedbelow may be used. In the example below, uniqueness at step 902 in FIG.9 is evaluated in the context of a particular level in a sorted orordered list of compatible cells. The following pseudocode shows anexample of this.

Define a function [C_noties, Cmap_noties] = tiebreaker(C,Cmap} such that  C is the compatibility matrix   Cmap is a vector of indices of theoriginal set of   cells, sorted by compatibility score   C_noties is thecompatibility matrix with a secondary   sorting process applied in orderto break up ties   between cells with equal batchCompatibilityScore  values   Cmap_noties is the revised mapping matrix that maps a   thekth cell of C_noties with the index of the   original set of cellsDefine nCells as the number of cells in the batch (the size of onedimension of C) /* Find the batchCompatibilityScore values of C */ foreach cell k = 1 :nCells:   batchCompatibilityScore_sorted(k) =sum(C(k,:)) end /* Note that since C is sorted,batchCompatibilityScore_sorted is already sorted in ascending value *//* Temporarily assign output variables */ Cmap_noties = Cmap C_noties =C /* Find all ties */ Define a function [Y] = findTies(X) such that:   Xis a vector of all batchCompatibilityScore values   Y is a set of arrayssuch that each array contains the   indices of each cell that has thesame   batchCompatibilityScore with other cells in that   array.  Example (note that all indices are 1-indexed): if X =   [1 2 3 3 34 56 6 7] then Y = findTies(X) returns:   Y = [[3 4 5], [8, 9]]   And usingcell array notation, Y{1} = [3, 4, 5] and   Y{2} = [8, 9] ties =findTies(batchCompatibilityScore_sorted) Define numTies as the number ofarrays in ties for each tie k = 1:numTies   tiedCells = ties{k}   /*Findthe least compatible cell in each cell in   tiedCells*/   minCell =min(C(tiedCells,:))   /* If there are multiple cells that have the same  minCell value, there is another tie, the findTies   function must berecursively run on the remaining tied   cells until each value minCellis lowest indexed cell   in C(tiedCells,:), unique to all other cells itis   tied with at the appropriate level of the tie. */   /* Update C tobe in the new order */   C noties(ties{k},:) =C(ties{k}(iTiebreakOrder),:)   Define numTiedCells as the number ofelements in   tiedCells   for each cell j in 1 :numTiedCells:    Cmap_noties(ties{k}(j)) =     Cmap_noties(ties{k}(iTiebreakOrder(j))  end end

The following figure shows an example of the above pseudocode usingexemplary batch compatibility numbers.

FIG. 12 is a diagram illustrating an embodiment of a tiebreakertechnique where cells which are compatible with the tied cells areordered based on batch compatibility number and then evaluated on alevel-by-level basis.

Diagram 1200 shows the three exemplary tied cells at the beginning ofthe tiebreaker process. All three tied cells have batch compatibilitynumbers of 4 and are therefore tied. The first tied cell (see row 1202)is compatible with cell A, cell B, cell C, and cell D; the second tiedcell (see row 1204) is compatible with cell B, cell C, cell E, and cellF; the third tied cell (see row 1206) is compatible with cell B, cell C,cell D, and cell E.

All of the compatible cells (shown in the right column) have their batchcompatibility numbers shown in parenthesis. Each set of compatible cells(e.g., row 1202, row 1204, and row 1206) is sorted based on the batchcompatibility number to produce a sorted list of compatible cells. Note,for example, that the compatible cells in row 1202, row 1204, and row1206 are sorted in ascending batch compatibility numbers going from leftto right.

With the sets of compatible cells sorted based on batch compatibilitynumber, a check is performed on a level-by-level basis going from leftto right (i.e., in ascending batch compatibility number order). Thecheck determines whether the minimum batch compatibility number isunique (e.g., for that level and for the cells or batch compatibilitynumbers being evaluated). Diagram 1200 shows the first check at thefirst (i.e., lowest) level. At that level, the lowest batchcompatibility number is 1 (associated with the first tied cell's cell A)and that batch compatibility number is unique so the first tied cellwins that tiebreaker round.

Diagram 1208 shows the second check at the second-lowest level. Sincethe first tied cell has already been selected or picked by thetiebreaker process, the first tied cell is not part of the check here.Note, for example, that its first place ordering is shown to the left ofrow 1202 in diagram 1208. In this check, the minimum batch compatibilitynumber is 3, but that batch compatibility number is not unique so thetiebreaking process moves on to the next level without declaring awinner.

Diagram 1212 shows the third check at the third-lowest level. The lowestbatch compatibility number here is 4 (associated with the third tiedcell's cell D) and that batch compatibility number is unique. Therefore,the third tied cell wins this tiebreaker round. By elimination, thesecond tied cell is third/last. The final ordering produced by theexemplary tiebreaker process is shown to the left of the table indiagram 1210: the first tied cell, then the third tied cell, and finallythe second tied cell. As shown here, uniqueness may be consideredlocally in the context of a level in a sorted or ordered list of cells(e.g., without considering other levels) and/or in the context of thecells being compared (e.g., without considering other cells which arenot part of the comparison).

The following figure describes this more formally and/or generally in aflowchart.

FIG. 13 is a flowchart illustrating an embodiment of a tiebreakerprocess where cells which are compatible with the tied cells are orderedbased on batch compatibility number and then evaluated on alevel-by-level basis for uniqueness. In some embodiments, step 900 inFIG. 9 includes the process shown.

At 1300, the plurality of sets of compatible cells are sorted based atleast in part on the batch compatibility numbers associated with theplurality of sets of compatible cells to obtain a plurality of sortedlists of compatible cells. See, for example, diagram 1200 in FIG. 12.Row 1202, row 1204, and row 1206 are sorted in ascending batchcompatibility number order (where the batch compatibility numbers usedfor sorting are associated with the cells that are compatible with thetied cells).

At 1302, two or more compatible cells to compare are selected fromdifferent sorted lists of compatible cells, wherein the selectedcompatible cells are at a same level in their respective sorted lists ofcompatible cells. In diagram 1200 in FIG. 12, for example, compatiblecell A (from row 1202), compatible cell B (from row 1204), compatiblecell B (from row 1206) are all in the same column and are selected forcomparison.

At 1304, it is determined whether a minimum batch compatibility number,associated with the selected compatible cells to compare, is unique. Indiagram 1200 in FIG. 12, for example, the minimum batch compatibilitynumber is one and it is unique. If so, a tied cell, associated withminimum and unique batch compatibility number, is selected as a tiebreakwinner. In diagram 1200 in FIG. 12, for example, the first tied cell isselected as the winner for the first round.

At 1308, it is determined if there are more tied cells. In the exampleof FIG. 12, the second tied cell and third tied cell still haveunresolved priorities or orders with respect to each other and thereforethe decision at step 1308 for that case is Yes. If there are no moretied cells, the process ends.

If there are more tied cells at step 1308, two or more compatible cellsto compare are selected at step 1302. In diagram 1208 in FIG. 12, forexample, any tied cells which have won a tiebreaking round are no longerconsidered (e.g., the first tied cell is no longer considered) and theselected compatible cells are associated with the next level (e.g., thecomparison moves from the lowest level to the second-lowest level).

If it is determined at step 1304 that the minimum batch compatibilitynumber, associated with the selected compatible cells to compare, is notunique, then two or more compatible cells to compare are selected atstep 1302. See, for example, diagram 1208 in FIG. 12. In thatcomparison, the minimum batch compatibility number is three and it isnot unique. Therefore, no winner is declared for that round and thecomparison moves on to the next level (in that example, thesecond-highest level) and the compatible cells in the correspondingcolumn.

Although the foregoing embodiments have been described in some detailfor purposes of clarity of understanding, the invention is not limitedto the details provided. There are many alternative ways of implementingthe invention. The disclosed embodiments are illustrative and notrestrictive.

What is claimed is:
 1. A battery, comprising: a container; a lid; and a plurality of compatible cells, wherein the plurality of compatible cells included in the battery is selected from a plurality of cells, including by: for each cell in the plurality of cells, receiving a first cell characteristic and a second cell characteristic in order to obtain a plurality of cell characteristics, wherein the plurality of cells are from a same manufacturing run; for each cell in the plurality of cells, determining, based at least in part on the plurality of cell characteristics, a batch compatibility number that is associated with a number of compatible cells that that cell is compatible with; sorting the plurality of cells according to the batch compatibility numbers in order to obtain a sorted list of cells; and selecting the plurality of compatible cells to include in the battery from the plurality of cells, including by evaluating the plurality of cells according to the order specified by the sorted list of cells and beginning with a cell with the lowest batch compatibility number.
 2. The battery recited in claim 1, wherein the first cell characteristic includes one of the following: capacity, open circuit voltage, resistance, or self-discharge rate.
 3. The battery recited in claim 1, wherein determining the batch compatibility number includes generating a cell compatibility matrix which indicates, for the plurality of cells, whether a given pair of cells is compatible.
 4. The battery recited in claim 1, wherein determining the batch compatibility number includes: determining a first difference between a first cell in the plurality of cells and a second cell in the plurality of cells for the first cell characteristic; determining a second difference between the first cell and the second cell for the second cell characteristic; and in the event (1) the first difference does not exceed a first tolerance associated with the first cell characteristic and (2) the second difference does not exceed a second tolerance associated with the second cell characteristic, declaring the first cell and the second cell to be compatible.
 5. The battery recited in claim 1, wherein sorting the plurality of cells includes: determining, for each tied cell in a plurality of tied cells, a set of compatible cells in order to obtain a plurality of sets of compatible cells; and breaking a tie between the plurality of tied cells based at least in part on uniqueness associated with the plurality of sets of compatible cells and one or more batch compatibility numbers associated with the plurality of sets of compatible cells.
 6. The battery recited in claim 1, wherein: sorting the plurality of cells includes: determining, for each tied cell in a plurality of tied cells, a set of compatible cells in order to obtain a plurality of sets of compatible cells; and breaking a tie between the plurality of tied cells based at least in part on uniqueness associated with the plurality of sets of compatible cells and one or more batch compatibility numbers associated with the plurality of sets of compatible cells; and breaking the tie between the plurality of tied cells includes: sorting the plurality of sets of compatible cells based at least in part on the batch compatibility numbers associated with the plurality of sets of compatible cells to obtain a plurality of sorted lists of compatible cells; selecting two or more compatible cells to compare from different sorted lists of compatible cells, wherein the selected compatible cells are at a same level in their respective sorted lists of compatible cells; and in the event a minimum batch compatibility number, associated with the selected compatible cells to compare, is unique, selecting a tied cell, associated with the minimum and unique batch compatibility number, as a tiebreak winner.
 7. A method, comprising: for each cell in a plurality of cells, receiving a first cell characteristic and a second cell characteristic in order to obtain a plurality of cell characteristics, wherein the plurality of cells are from a same manufacturing run; for each cell in the plurality of cells, determining, based at least in part on the plurality of cell characteristics, a batch compatibility number that is associated with a number of compatible cells that that cell is compatible with; sorting the plurality of cells according to the batch compatibility numbers in order to obtain a sorted list of cells; and selecting a plurality of compatible cells to include in a battery from the plurality of cells, including by evaluating the plurality of cells according to the order specified by the sorted list of cells and beginning with a cell with the lowest batch compatibility number, wherein the plurality of compatible cells are included in the battery.
 8. The method recited in claim 7, wherein the first cell characteristic includes one of the following: capacity, open circuit voltage, resistance, or self-discharge rate.
 9. The method recited in claim 7, wherein determining the batch compatibility number includes generating a cell compatibility matrix which indicates, for the plurality of cells, whether a given pair of cells is compatible.
 10. The method recited in claim 7, wherein determining the batch compatibility number includes: determining a first difference between a first cell in the plurality of cells and a second cell in the plurality of cells for the first cell characteristic; determining a second difference between the first cell and the second cell for the second cell characteristic; and in the event (1) the first difference does not exceed a first tolerance associated with the first cell characteristic and (2) the second difference does not exceed a second tolerance associated with the second cell characteristic, declaring the first cell and the second cell to be compatible.
 11. The method recited in claim 7, wherein sorting the plurality of cells includes: determining, for each tied cell in a plurality of tied cells, a set of compatible cells in order to obtain a plurality of sets of compatible cells; and breaking a tie between the plurality of tied cells based at least in part on uniqueness associated with the plurality of sets of compatible cells and one or more batch compatibility numbers associated with the plurality of sets of compatible cells.
 12. The method recited in claim 7, wherein: sorting the plurality of cells includes: determining, for each tied cell in a plurality of tied cells, a set of compatible cells in order to obtain a plurality of sets of compatible cells; and breaking a tie between the plurality of tied cells based at least in part on uniqueness associated with the plurality of sets of compatible cells and one or more batch compatibility numbers associated with the plurality of sets of compatible cells; and breaking the tie between the plurality of tied cells includes: sorting the plurality of sets of compatible cells based at least in part on the batch compatibility numbers associated with the plurality of sets of compatible cells to obtain a plurality of sorted lists of compatible cells; selecting two or more compatible cells to compare from different sorted lists of compatible cells, wherein the selected compatible cells are at a same level in their respective sorted lists of compatible cells; and in the event a minimum batch compatibility number, associated with the selected compatible cells to compare, is unique, selecting a tied cell, associated with the minimum and unique batch compatibility number, as a tiebreak winner.
 13. A computer program product, the computer program product being embodied in a non-transitory computer readable storage medium and comprising computer instructions for: for each cell in a plurality of cells, receiving a first cell characteristic and a second cell characteristic in order to obtain a plurality of cell characteristics, wherein the plurality of cells are from a same manufacturing run; for each cell in the plurality of cells, determining, based at least in part on the plurality of cell characteristics, a batch compatibility number that is associated with a number of compatible cells that that cell is compatible with; sorting the plurality of cells according to the batch compatibility numbers in order to obtain a sorted list of cells; and selecting a plurality of compatible cells to include in a battery from the plurality of cells, including by evaluating the plurality of cells according to the order specified by the sorted list of cells and beginning with a cell with the lowest batch compatibility number, wherein the plurality of compatible cells are included in the battery.
 14. The computer program product recited in claim 13, wherein the first cell characteristic includes one of the following: capacity, open circuit voltage, resistance, or self-discharge rate.
 15. The computer program product recited in claim 13, wherein determining the batch compatibility number includes generating a cell compatibility matrix which indicates, for the plurality of cells, whether a given pair of cells is compatible.
 16. The computer program product recited in claim 13, wherein determining the batch compatibility number includes: determining a first difference between a first cell in the plurality of cells and a second cell in the plurality of cells for the first cell characteristic; determining a second difference between the first cell and the second cell for the second cell characteristic; and in the event (1) the first difference does not exceed a first tolerance associated with the first cell characteristic and (2) the second difference does not exceed a second tolerance associated with the second cell characteristic, declaring the first cell and the second cell to be compatible.
 17. The computer program product recited in claim 13, wherein sorting the plurality of cells includes: determining, for each tied cell in a plurality of tied cells, a set of compatible cells in order to obtain a plurality of sets of compatible cells; and breaking a tie between the plurality of tied cells based at least in part on uniqueness associated with the plurality of sets of compatible cells and one or more batch compatibility numbers associated with the plurality of sets of compatible cells.
 18. The computer program product recited in claim 13, wherein: sorting the plurality of cells includes: determining, for each tied cell in a plurality of tied cells, a set of compatible cells in order to obtain a plurality of sets of compatible cells; and breaking a tie between the plurality of tied cells based at least in part on uniqueness associated with the plurality of sets of compatible cells and one or more batch compatibility numbers associated with the plurality of sets of compatible cells; and breaking the tie between the plurality of tied cells includes: sorting the plurality of sets of compatible cells based at least in part on the batch compatibility numbers associated with the plurality of sets of compatible cells to obtain a plurality of sorted lists of compatible cells; selecting two or more compatible cells to compare from different sorted lists of compatible cells, wherein the selected compatible cells are at a same level in their respective sorted lists of compatible cells; and in the event a minimum batch compatibility number, associated with the selected compatible cells to compare, is unique, selecting a tied cell, associated with the minimum and unique batch compatibility number, as a tiebreak winner. 